<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="步骤1：开启Active Directory回收站">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="ActiveDirectory-00010.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
<meta name="DC.Publisher" content="20240320">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="ZH-CN_TOPIC_0000002020257438">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>步骤1：开启Active Directory回收站</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="ZH-CN_TOPIC_0000002020257438"></a><a name="ZH-CN_TOPIC_0000002020257438"></a>

<h1 class="topictitle1">步骤1：开启Active Directory回收站</h1>
<div><p>备份操作前务必先开启Active Directory回收站，否则恢复对象时可能存在部分属性恢复失败的问题。</p>
<div class="section"><h4 class="sectiontitle">注意事项</h4><ul><li>Active Directory回收站一旦启用则不能禁用。</li><li>默认删除的对象Active Directory回收站会保留180天。</li><li>Active Directory回收站开启会占用存储空间，如果存储空间不足可能会影响系统运行。</li><li>Active Directory回收站是Windows Server 2008 R2及之后版本支持的功能。</li></ul>
</div>
<div class="section"><h4 class="sectiontitle">操作步骤</h4><p>以下操作以Windows Server 2019为例。</p>
<ol><li><span>使用Administrator用户登录远程主机。</span></li><li><span>在下方搜索栏中输入“Active Directory管理中心”。</span></li><li><span>右键单击“Active Directory管理中心”选择<span class="uicontrol">“以管理员身份运行”</span>。</span><p><p>弹出“Active Directory管理中心”窗口。</p>
</p></li><li><span>单击左侧导航栏的<span class="uicontrol">“本地”</span>。</span></li><li><span>单击右侧任务栏中“<span style="color:#161616;">启用回收站</span>”。</span><p><p><span style="color:#161616;">弹出启用回收站确认的</span><span style="color:#161616;">对话框。</span></p>
</p></li><li><span>单击<span class="uicontrol">“是”</span>。</span></li><li><span><span style="color:#161616;">在弹出的</span><span style="color:#161616;">对话框中</span>单击“确定”。</span></li><li><span>单击右上角的<span><img src="zh-cn_image_0000002062049785.png"></span>按钮。</span><p><p>右侧任务栏中“<span style="color:#161616;">启用回收站</span>”字体变灰表示已启用。</p>
</p></li><li><strong>可选：</strong><span><span style="color:#252B3A;">修改回收站默认保留时间。</span></span><p><ol type="a"><li>在下方搜索栏中输入“Windows PowerShell”。</li><li>右键单击“Windows PowerShell”选择<span class="uicontrol">“以管理员身份运行”</span>，打开Windows PowerShell。</li><li>执行以下命令，查询域控制器名称。<pre class="screen">$deletedObjectLifetime | Format-List *</pre>
<p><span><img src="zh-cn_image_0000002022517518.png"></span></p>
</li><li>执行以下命令，修改<span style="color:#252B3A;">回收站保留天数</span>。以域控制器名“DC=TREE,DC=LONGEDC,DC=COM”为例。<pre class="screen">Set-ADObject -Identity “CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=<em>TREE</em>,DC=<em>LONGEDC</em>,DC=<em>COM</em>" -Partition “CN=Configuration, DC=<em>TREE</em>,DC=<em>LONGEDC</em>,DC=<em>COM</em>” -Replace:@{“tombstoneLifetime” = <em>365</em>}
Set-ADObject -Identity “CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=<em>TREE</em>,DC=<em>LONGEDC</em>,DC=<em>COM</em>" -Partition “CN=Configuration, DC=<em>TREE</em>,DC=<em>LONGEDC</em>,DC=<em>COM</em>” -Replace:@{“msDS-DeletedObjectLifetime” = <em>365</em>}</pre>
</li><li>打开Windows系统的cmd，执行以下命令验证更改是否生效。<pre class="screen">dsquery * "CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=<em>TREE</em>,DC=<em>LONGEDC</em>,DC=<em>COM</em>" -scope base -attr tombstoneLifetime</pre>
<p>回显数字为更改后的天数表明修改生效。</p>
<p><span><img src="zh-cn_image_0000002058059565.png"></span></p>
</li></ol>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="ActiveDirectory-00010.html">备份Active Directory</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>